<template>
  <div style="text-align:center;background-color: #FFFFFF; height: 100%;" >
    <el-main style="background-color: #FFFFFF;">
      <el-col :xs="15" :sm="15" :md="15" :lg="15">
        <table border="0" style="width: 160%; " align="center">
          <tr>
            <td colspan="3">
              <el-carousel :interval="3000" type="" arrow="never" height="200px"  >
                <el-carousel-item v-for="item in imagebox" :key="item.id">
                  <img :src="item.idView" class="image" style="width:100%;height:inherit;">
                </el-carousel-item>
              </el-carousel>
            </td>
          </tr>
          <tr align="center">
            <td >
              <el-col :span="23">
                <div class="grid-content" style="width: 100%;height: 100%;"><img src="./img/falvtiaokuan.png">
                  <center>
                    <el-button type="text" @click="jump('/guidance/JpContentList')">证据指引</el-button>
                  </center>
                </div>
              </el-col>
            </td>
            <td>
              <el-col :span="23">
                <div class="grid-content "><img src="./img/xiaoxi.png">
                  <center>
                    <el-button type="text" @click="jump('/mailbox/index')">信箱</el-button>
                  </center>
                </div>
              </el-col>
            </td>
            <td>
              <el-col :span="23">
                <div class="grid-content "><img src="./img/falvfagui.png">
                  <center>
                    <el-button type="text" @click="jump('/dqsy/alk/AtRightTreeList')">案例库</el-button>
                  </center>
                </div>
              </el-col>
            </td>
          </tr>
          <tr align="center">
            <td>
              <el-col :span="23">
                <div class="grid-content "><img src="./img/falvwenshu.png">
                  <center>
                    <el-button type="text" @click="jump('handlingcases/YjyShoujiList')">办案手记</el-button>
                  </center>
                </div>
              </el-col>
            </td>
            <td>
              <el-col :span="23">
                <div class="grid-content "><img src="./img/tongzhitonggao.png">
                  <center>
                    <el-button type="text" @click="jump('/notify/MyNotifyList')">我的通告</el-button>
                  </center>
                </div>
              </el-col>
            </td>
            <td>
              <el-col :span="23">
                <div class="grid-content "><img src="./img/taolun.png">
                  <center>
                    <el-button type="text" @click="jump()">问题讨论</el-button>
                  </center>
                </div>
              </el-col>
            </td>
          </tr>
          <tr align="center">
            <td>
              <el-col :span="23">
                <div class="grid-content "><img src="./img/falv.png">
                  <center>
                    <el-button type="text" @click="jump('/dqsy/quiry/FfLeftTreesList')">法律查询</el-button>
                  </center>
                </div>
              </el-col>
            </td>
          </tr>
        </table>
      </el-col>
    </el-main>

    <div class="footer_guide">

        <a href="javascript:;" class="guide_item" :class="{on : '/order'===$route.path}" @click="goTo('/calendar/MyCalendar')">
          <span class="item_icon">
            <i class="el-icon-s-promotion" style="font-size: 35px;"></i>
          </span>
          <span>日程</span>
        </a>
        <a href="javascript:;" class="guide_item" :class="{on : '/order'===$route.path}" @click="goTo('/application/index')">
          <span class="item_icon">
            <i class="el-icon-s-shop" style="font-size: 35px;"></i>
          </span>
          <span>应用库</span>
        </a>

        <a href="javascript:;" class="guide_itemc" :class="{on : '/msite'===$route.path}" @click="goTo('/home')">
          <span class="item_icon" >
            <i class="el-icon-s-home" style="font-size: 60px; font-weight: bold; color: #1890FF;"> </i>
          </span>
          <span style="color: #1890FF;">工作台</span>
        </a>

        <a href="javascript:;" class="guide_item" :class="{on : '/order'===$route.path}" @click="goTo('/mailbox/index')">
          <span class="item_icon">
            <i class="el-icon-s-comment" style="font-size: 35px;"  ></i>
          </span>
          <span >消息</span>
        </a>
        <a href="javascript:;" class="guide_item" :class="{on : '/profile'===$route.path}" @click="goTo('/sys/user/UserInfo')">
          <span class="item_icon">
            <i class="el-icon-user-solid" style="font-size: 35px;"></i>
          </span>
          <span>我的</span>
        </a>
      </div>

  </div>
</template>

<script>
  export default {
    data() {
      return {
        imagebox: [{id: 0,
          idView: require('./img/timg.jpg')},
        {id: 1,
          idView: require('./img/timg1.jpg')
        },
        {id: 2,
          idView: require('./img/timg2.jpg')
        }
        ],
        screenWidth: 0
      }
    },
    methods: {
      jump(p) {
        this.$router.push(p)
      },
      goTo(path) {
        this.$router.replace(path)
      },
      setSize: function() {
        // 通过浏览器宽度(图片宽度)计算高度
        this.bannerHeight = 400 / 1920 * this.screenWidth
      }
    },
    mounted() {
      // 首次加载时,需要调用一次
      this.screenWidth = window.innerWidth
      this.setSize()
      // 窗口大小发生改变时,调用一次
      window.onresize = () => {
        this.screenWidth = window.innerWidth
        this.setSize()
      }
    }
  }
</script>

<style>
  .footer_guide {
    border-top: 1px soild #e4e4e4;
    position: fixed;
    z-index: 100;
    left: 0;
    right: 0;
    bottom: 1px;
    font-size: 600px;
    background-color: #fff;
    width: 100%;
    height: 80px;
    display: flex;

  }

  .guide_item {
    display: flex;
    flex: 1;
    text-align: center;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    color: #999999;
  }

  .guide_itemc {
    display: flex;
    flex: 1;
    text-align: center;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    color: #999999;
  }

  .on {
    color: #02a774
  }

  span {
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 2px;
  }

  .iconfont {
    font-size: 22px;
  }

  .el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    line-height: 300px;
    margin: 0;
  }

  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }

  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>
